package yto.net.integrateddata.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yto.net.integrateddata.common.R;
import yto.net.integrateddata.util.ExceptionUtils;

/**
 * @Author Suna
 * @Date 2020/9/23 10:30
 */
@RestController
@RequestMapping("/login")
public class LoginController {

    private static final Log log = LogFactory.getLog(LoginController.class);

    @PostMapping("/userLogin")
    public R userLogin(){
        try {
            return R.ok("登录成功");
        }catch (Exception e){
            log.error(ExceptionUtils.toString(e));
            return R.error("登录失败");
        }
    }
}
